thumbnails: extract pictures from audio files #7491
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR uses https://github.com/dhowden/tag to extract pictures from audio files in the thumbnails service.
Related Issue
Motivation and Context
It would be nice to show appropriate cover images for audio files in the Web UI.
The main problem for now (which can totally be solved in another iteration is that not every audio file has embedded cover artwork, so on a page with a bunch of audio files, we would likely trigger a lot of status 500 requests.
This is my pet peeve, no company task - while reviews are personally appreciated, there is no priority.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Followup tasks
It would be nice to know in advance whether a thumbnail is available or not - via propfind or graph api. For that we likely need to store thumbnail information in the metadata - but who would be responsible for that? thumbnails service, search service, ...?
AFAICT tika does not extract image information from audio files - so we would need to duplicate some of the functionality here in the search service to write thumbnail information to the metadata. The thumbnail service does not generate images before they are requested, so we would have the information only on the second directly listing, so search service seems like a better fit actually...